import request from '@/utils/request'

// 查询料仓列表
export function listInfo(query) {
  return request({
    url: '/silo/info/list',
    method: 'get',
    params: query
  })
}

export function pageInfo(query) {
  return request({
    url: '/silo/info/page',
    method: 'get',
    params: query
  })
}

// 查询料仓详细
export function getInfo(siloId) {
  return request({
    url: '/silo/info/' + siloId,
    method: 'get'
  })
}

// 新增料仓
export function addInfo(data) {
  return request({
    url: '/silo/info',
    method: 'post',
    data: data
  })
}

// 修改料仓
export function updateInfo(data) {
  return request({
    url: '/silo/info',
    method: 'put',
    data: data
  })
}

// 删除料仓
export function delInfo(siloId) {
  return request({
    url: '/silo/info/' + siloId,
    method: 'delete'
  })
}

// 导出料仓
export function exportInfo(query) {
  return request({
    url: '/silo/info/export',
    method: 'get',
    params: query
  })
}

export function enableSilo(data) {
  return request({
    url: '/silo/info/enableSilo',
    method: 'post',
    data: data
  })
}

export function getOptionList(query) {
  return request({
    url: '/silo/info/getOptionList',
    method: 'get',
    params: query
  })
}

export function getSiloDialog(query) {
  return request({
    url: '/silo/info/getSiloDialog',
    method: 'get',
    params: query
  })
}

export function mixingWaterVolume1Dialog(query) {
  return request({
    url: '/silo/info/getMixingWaterVolume1Dialog',
    method: 'get',
    params: query
  })
}

export function mixingWaterVolume2Dialog(query) {
  return request({
    url: '/silo/info/getMixingWaterVolume2Dialog',
    method: 'get',
    params: query
  })
}

export function totalMaterialQuantityDialog(query) {
  return request({
    url: '/silo/info/totalMaterialQuantityDialog',
    method: 'get',
    params: query
  })
}

export function getMixedAttrValue(query) {
  return request({
    url: '/silo/info/getMixedAttrValue',
    method: 'get',
    params: query
  })
}
